<template>
	<view class="adas">
		<button @click="dangshi()">sbjs</button>
		<view class="tan" :style="{display: currentId ? 'block' : 'none'}" >
			<view class="ding" v-show="currentId"> 
				<image src="../../static/删除.png" mode="" class="img1" @click="but()"></image>
				<view class="top">
					<p>450元优惠券包</p>
					<p>券包规则详见活动规则</p>
				</view>
				<view class="content">
					<scroll-view scroll-y="true" style="height:500rpx;">
						<view>
							<view v-for="(item,index) in list" :key="index" class="flex box">
								<view class="zuo">
									<p>{{item.num1}}<span>{{item.num2}}</span></p>
								</view>
								<view class="you">
									<p class="p1">{{item.num3}}</p>
									<p class="p2">{{item.num4}}</p>
									<p class="p3">{{item.num5}}</p>
								</view>

							</view>
							<p>{{num6}}</p>
						</view>
					</scroll-view>
				</view>
				<view class="qiang">
					<button>抢购</button>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				currentId:false,
				num6: '到底了',
				list: [{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					},
					{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					},
					{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					}, {
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					},
					{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					},
					{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					},
					{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效'
					},
					{
						num1: '45',
						num2: '元',
						num3: '45元满减券',
						num4: '满200元使用',
						num5: '领取后当天生效',

					}
				]
			}
		},
		methods: {
			dangshi: function() {
				let that = this
				that.currentId = !that.currentId
				console.log(that.currentId)
				// uni.navigateTo({
				// 	url:"/pages/personal/today"
				// })
			
			},
			but: function() {
				let that = this
				that.currentId = !that.currentId
				console.log(that.currentId)
			}
		}
	}
</script>

<style lang="scss">
	.flex {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.tan {
		display: none;
		background-color: rgba(0, 0, 0, 0.1);
		height: 2000rpx;
		color: #fff;
		text-align: center;
		position: fixed;
		z-index:999;
	}

	.img1 {
		position: absolute;
		top: -70rpx;
		width: 70rpx;
		height: 70rpx;
		right: -40rpx;
	}

	.ding {
		background-color: #f00;
		width: 70%;
		border-radius: 20rpx;
		position: fixed;
		top: 300rpx;
		left: 100rpx;
		z-index: 1;
	}

	.top {
		padding: 20rpx 0;
	}

	.content {
		text-align: center;
		height: 500rpx;
	}

	.qiang button {
		width: 50%;
		margin: 20rpx auto;
		background-color: #ffebcd;
		border-radius: 50rpx;
		color: #f00;
	}

	.box {
		width: 80%;
		margin: 10rpx auto;
		background-color: #ffebcd;
		border-radius: 20rpx;
		padding: 20rpx;
	}

	.zuo {
		border-right: #fddeca dashed 3px;
		line-height: 30px;
		padding: 0 10rpx;
	}

	.zuo p {
		color: #f00;
		font-size: 25px;
		font-weight: bold;
	}

	.zuo p span {
		font-size: 10px;
		font-weight: normal;
	}

	.you .p1 {
		color: #000;
	}

	.you .p2 {
		color: #f00;
	}

	.you .p3 {
		color: #ccc;
	}
</style>
